﻿@using Masa.Blazor
@using Microsoft.AspNetCore.Components.Routing
@using System.Reflection
@inject BlazorAppService AppService
@inject NavigationManager NavigationManager
@namespace ThingsGateway.Components
<MCard Flat Style="background-color:inherit;" Href=@BlazorAppInfoConfigs.Current.FooterUri Target="_blank">
     <MLabel Style="background-color:inherit;" Class="text-subtltie-2">@BlazorAppInfoConfigs.Current.FooterString</MLabel>
        <MLabel Style="background-color:inherit;white-space: pre;" Class="text-subtltie-2 ml-4">@Version</MLabel>
    </MCard>

@code {

    [CascadingParameter(Name = "Culture")]
    public string? Culture { get; set; }

    private string Version = "";

    /// <inheritdoc/>
    protected override Task OnInitializedAsync()
    {
        var assembly = Assembly.GetEntryAssembly();
        if (assembly != null)
        {
            Version = $"v{assembly.GetName().Version}";
        }
        return base.OnInitializedAsync();
    }
    }